<?php
/**
 * @Copyright Copyright (C) 2010-2012 ... Webit Solution
 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
 * Company:		Webit Solution
 + Contact:		www.webits.asia, developer@webits.asia
 * Created on:	Mar 21, 2012
 ^
 + Project: 		WRecruit
 * File Name:	admin-----/views/application/tmpl/info.php
 ^ 
 * Description: WRecruit Information
 ^ 
 * History:		NONE
 ^ 
 */
defined('_JEXEC') or die('Restricted access');
 global $mainframe;
 JRequest :: setVar('layout', 'view_job');
$_SESSION['cur_layout']='view_job';


?>

<table width="100%">
	<tr>
		<td align="left" width="175" valign="top">
			<table width="100%"><tr><td style="vertical-align:top;">
			<?php
			include_once('components/com_wrecruit/views/menu.php');
			?>
			</td>
			</tr></table>
		</td>
		<td width="100%" valign="top">
			<form action="index.php" method="POST" name="adminForm">
			<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="boxchecked" value="0" />
			</form>
			<table cellpadding="5" cellspacing="0" border="0" width="100%" class="adminform" >
			<?php
		$trclass = array("row0", "row1");
		$i = 0;
		$isodd = 1;
		
		foreach($this->fieldsordering as $field){ 
			switch ($field->field) {
				case "jobtitle": $isodd = 1 - $isodd; ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td width="5%">&nbsp;</td>
				        <td width="30%"><b><?php echo JText::_('JS_TITLE'); ?></b></td>
						<td><?php echo $this->job->title; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
			 case "company": $isodd = 1 - $isodd; ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_COMPANY'); ?></b></td>
						<td><?php echo $this->job->companyname; ?></td>
				      </tr>
				      <tr> <td colspan="3" height="1"></td> </tr>
				<?php break;
				case "department": $isodd = 1 - $isodd; ?>
				      	<tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_DEPARTMENT'); ?></b></td>
						<td>
							<?php echo $this->job->departmentname; ?>
						</td>
				      </tr>
				      <tr> <td colspan="3" height="1"></td> </tr>
				<?php break;
				
				case "video": $isodd = 1 - $isodd; ?>
                                    <?php  if ($this->job->video == 1) { ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_VIDEO'); ?></b></td>
						<td>
							<object width="425" height="344">
							<param name="movie" value="http://www.youtube.com/v/<?php echo $this->job->video; ?>&hl=en_US&fs=1&rel=0"></param>
							<param name="allowFullScreen" value="true"></param>
							<param name="allowscriptaccess" value="always"></param>
							<embed src="http://www.youtube.com/v/<?php echo $this->job->video; ?>&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
							</object>

						</td>
				      </tr>
				      <tr> <td colspan="3" height="1"></td> </tr>
					  <?php } ?>
				<?php  break;
						case "map": $isodd = 1 - $isodd; ?>
						<?php  if ($this->job->map == 1) { ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_MAP'); ?></b></td>
						<td>
							<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
								src="<?php echo $this->job->map; ?>">
							</iframe><br />
							<small><a href="<?php echo $this->job->map; ?>" target="_blank">View Larger Map</a></small>
						</td>
				      </tr>
				      <tr> <td colspan="3" height="1"></td> </tr>
					<?php } ?>

				<?php break;
				case "jobcategory": $isodd = 1 - $isodd; ?>
					 <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
						<td><b><?php echo JText::_('JS_CATEGORY'); ?></b></td>
						<td><?php echo $this->job->cat_title; ?></td>
					  </tr>
					  <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "jobtype": $isodd = 1 - $isodd; ?>
				     <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_JOBTYPE'); ?></b></td>
						<td><?php echo $this->job->jobtypetitle; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td> </tr>
				<?php break;
				case "jobstatus": $isodd = 1 - $isodd; ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_JOBSTATUS'); ?></b></td>
						<td><?php echo $this->job->jobstatustitle; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td> </tr>
				<?php break;
				case "jobshift": $isodd = 1 - $isodd; ?>
			      <?php if ( $field->published == 1 ) { ?>
				     <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_SHIFT'); ?></b></td>
						<td><?php echo $this->job->shifttitle; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td> </tr>
				  <?php } ?>
				<?php break;
				case "jobsalaryrange":  ?>
			      <?php if ( $field->published == 1 ) { ?>
					<?php if ( $this->job->hidesalaryrange != 1 ) { // show salary 
					$isodd = 1 - $isodd; ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_SALARYRANGE'); ?></b></td>
						<td><?php
							if ($this->job->salaryfrom) echo JText::_('JS_S_FROM') .' '. $this->config['currency'] . $this->job->salaryfrom;
							if ($this->job->salaryto) echo ' - ' . JText::_('JS_S_TO'). ' '. $this->config['currency'] . $this->job->salaryto;;
							if ($this->job->salarytype) echo ' ' . $this->job->salarytype;;
							//echo $salaryrange; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td></tr>
					<?php } ?>
				  <?php } ?>
				<?php break;
				case "heighesteducation": $isodd = 1 - $isodd; ?>
			      <?php if ( $field->published == 1 ) { ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <?php
						if($this->job->iseducationminimax == 1){
							if($this->job->educationminimax == 1) $title = JText::_('JS_MINIMUM_EDEDUCATION');
							else $title = JText::_('JS_MAXIMUM_EDEDUCATION');
							$educationtitle = $this->job->educationtitle;
						}else {
							$title = JText::_('JS_EDEDUCATION');
							$educationtitle = $this->job->mineducationtitle.' - '.$this->job->maxeducationtitle;
						}
					?>
					<td><b><?php echo $title; ?></b></td>
						<td><?php echo $educationtitle; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td> </tr>
				      <?php $isodd = 1 - $isodd; ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
					<td><b><?php echo JText::_('JS_DEGREE_TITLE'); ?></b></td>
						<td><?php echo $this->job->degreetitle; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td> </tr>
					<?php } ?>
				<?php break;
				case "noofjobs": $isodd = 1 - $isodd; ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_NOOFJOBS'); ?></b></td>
						<td><?php echo $this->job->noofjobs; ?></td>
				      </tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "experience": $isodd = 1 - $isodd; ?>
			      <?php if ( $field->published == 1 ) { ?>
				     <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <?php
						if($this->job->isexperienceminimax == 1){
							if($this->job->experienceminimax == 1) $title = JText::_('JS_MINIMUM_EXPERIENCE');
							else $title = JText::_('JS_MAXIMUM_EXPERIENCE');
							$experiencetitle = $this->job->experiencetitle;
						}else {
							$title = JText::_('JS_EXPERIENCE');
							$experiencetitle = $this->job->minexperiencetitle.' - '.$this->job->maxexperiencetitle;
						}
						if($this->job->experiencetext) $experiencetitle .= ' ('.$this->job->experiencetext.')';
					?>
				        <td><b><?php echo $title; ?></b></td>
						<td><?php echo $experiencetitle; ?>
						</td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				  <?php } ?>
				<?php break;
				case "duration": $isodd = 1 - $isodd; ?>
			      <?php if ( $field->published == 1 ) { ?>
				      <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_DURATION'); ?></b></td>
						<td><?php echo $this->job->duration; ?>
					</td>
			      </tr>
				      <tr><td colspan="3" height="1"></td></tr>
				  <?php } ?>
				<?php break;
				case "startpublishing": $isodd = 1 - $isodd; ?>
				      <?php //if ($vj == '1'){ //my jobs ?> 
						  <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
					        <td><b><?php echo JText::_('JS_START_PUBLISHING'); ?></b></td>
							<td><?php echo date($this->config['date_format'],strtotime($this->job->startpublishing)); ?></td>
						  </tr>
					      <tr><td colspan="3" height="1"></td></tr>
					  <?php //} ?>
				<?php break;
				case "stoppublishing": $isodd = 1 - $isodd; ?>
				      <?php //if ($vj == '1'){ //my jobs ?> 
						    <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
						        <td><b><?php echo JText::_('JS_STOP_PUBLISHING'); ?></b></td>
								<td><?php echo  date($this->config['date_format'],strtotime($this->job->stoppublishing)); ?></td>
							</tr>
					      <tr><td colspan="3" height="1"></td></tr>
					  <?php //} ?>
				<?php break;
				case "agreement": $isodd = 1 - $isodd; ?>
				    <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_AGREEMENT'); ?></b></td>
						<td><?php echo $this->job->agreement; ?></td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "qualifications": $isodd = 1 - $isodd; ?>
				    <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_QUALIFICATIONS'); ?></b></td>
						<td><?php echo $this->job->qualifications; ?></td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "prefferdskills": $isodd = 1 - $isodd; ?>
				    <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_PREFFERD_SKILLS'); ?></b></td>
						<td><?php echo $this->job->prefferdskills; ?></td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "country": $isodd = 1 - $isodd; ?>
				    <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_COUNTRY'); ?></b></td>
						<td><?php echo $this->job->countryname; ?></td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "state": $isodd = 1 - $isodd; ?>
				    <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_STATE'); ?></b></td>
						<td><?php if($this->job->statename != '') echo $this->job->statename; elseif($this->job->state != '') echo $this->job->state; ?></td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "county": $isodd = 1 - $isodd; ?>
				   <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_COUNTY'); ?></b></td>
						<td><?php if($this->job->countyname != '') echo $this->job->countyname; elseif($this->job->county != '') echo $this->job->county; ?></td>
					</tr>
				      <tr><td colspan="3" height="1"></td></tr>
				<?php break;
				case "city": $isodd = 1 - $isodd; ?>
				   <tr class="<?php echo $trclass[$isodd]; ?>"><td></td>
				        <td><b><?php echo JText::_('JS_CITY'); ?></b></td>
						<td><?php if($this->job->cityname != '') echo $this->job->cityname; elseif($this->job->city != '') echo $this->job->city;?></td>
					</tr>
				     <tr><td colspan="3" height="1"></td></tr>
				
				
					<?php } ?>	
				<?php } ?>	
							
		</table>	
		</td>
	</tr>
	<tr>
		<td colspan="2" align="left" width="100%"  valign="top">
			<table width="100%" style="table-layout:fixed;"><tr><td style="vertical-align:top;">
			<?php
				include_once('components/com_wrecruit/views/jscr.php');
			?>
			</td>
			</tr></table>
		</td>
	</tr>
</table>							
<script language="javascript" type="text/javascript">
	dhtml.cycleTab('tab1');
</script>

